/**
 * Created by castle on 2015/06/06.
 */
var SActivity = function(){
    return {
        init:function(){
            $.ajax({
                url:'http://api.tansuyun.cn?i=9GetJoinActivity&tsy='+getCookie('tsy'),
                data:{SUID:getCookie('un')},
                method:'post',
                type:'json',
                success: function (d) {
                    if(d.c==200){
                        var sum = 0;
                        var html = '';
                        $.each(d.d,function(i,v){
                            sum += v.Hour;
                            html += '<tr class="odd"><td class="sorting_1">'+ v.OrganizationName +'</td><td class=" "> '+ getLocalTime(v.Date) +'</td><td class=" "> '+ v.Hour +'</td><td class="center "> '+ sum +'</td><td class=" "> '+ v.ActivityName +'</td><td class=" "> '+ v.Level +'</td></tr>';
                        });
                        $('#StudentActivity').html(html);
                    }
                }
            });
        }
    };
}();